<!DOCTYPE html>
<html lang="zh-CN">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>

    <style>
        .box {
            width: 600px;
            height: 600px;
            border: 5px solid red;
            display: grid;
            text-align: center;
            line-height: 200px;

            /* 设置行 列 固定值 */
            /* grid-template-rows: 200px 200px 200px;
            grid-template-columns: 200px 200px 200px; */

            /* 百分比方式 */
            /* grid-template-rows: 25% 25% 25% 25%;
            grid-template-columns: 25% 25% 25% 25%; */
            /* repeat 重复 */
            /* grid-template-rows: repeat(3,33.33%);
           grid-template-columns: repeat(3,33.33%); */

            /* repeat 重复  auto-fill*/
            /* grid-template-rows: repeat(auto-fill,200px);
           grid-template-columns: repeat(auto-fill,200px); */


            /* fr 片段 */
            /* grid-template-rows: 1fr 2fr 2fr;
            grid-template-columns: 1fr 2fr 2fr */

            /* 最小最大 */
            /* grid-template-rows: minmax(100px,200px) 200px 100px ;
            grid-template-columns: 200px 200px 200px; */
            
            /*auto  */
            grid-template-rows: 100px auto 200px;
            grid-template-columns: 100px auto 200px;
        }
    </style>

</head>

<body>
    <div class="box">
        <div>1</div>
        <div>2</div>
        <div>3</div>
        <div>4</div>
        <div>5</div>
        <div>6</div>
        <div>7</div>
        <div>8</div>
        <div>9</div>

    </div>

</body>

</html>